﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WF_AppFuel.Validation.Base;

namespace WF_AppFuel.Validation.Base
{
    /// <summary>
    /// Base class to which all validation engine implementations must extend.
    /// </summary>
    /// <author>Arjay Nacion</author>
    public abstract class BaseValidationEngine
    {
        /// <summary>
        /// Executes this validation engine to current value
        /// using the rule defined by the associated validation attribute.
        /// </summary>
        /// <returns>True on validation success, otherwise false.</returns>
        public abstract bool Run();

        internal object Value { get; set; }

        internal IValidationAttribute ValidationAttribute { get; set; }
    }
}
